﻿<?xmlversion ="1.0"encoding="utf-8" ?>
<configuration>
  <configSections>
    <sectionname type="log4net.Config.Log4NetConfigurationSectionHandler" />
  </configSections>
  <log4net>
    <!-- Define some output appenders -->
    <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
      <file value="log/AppInfo.log"/>
      <appendToFile value="true"/>
      <maxSizeRollBackups value="10"/>
      <maximumFileSize value="8MB"/>
      <rollingStyle value="Size"/>
      <staticLogFileName value="true"/>
      <layout type="log4net.Layout.PatternLayout">
        <header value="[Header]&#xD;&#xA;" />
        <footer value="[Footer]&#xD;&#xA;" />
        <conversionPattern value="%date [%thread] %-5level %logger [Line:%L] - %message%newline"/>
      </layout>
    </appender>

    <!-- Console部分log输出格式的设定-->
    <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%date [%thread] %-5level %logger %ndc - %message%newline"/>
      </layout>
    </appender>
    
    <root>
      <level value="DEBUG"/>
      <appender-ref ref="RollingLogFileAppender"/>
      <!--<appender-ref ref="ConsoleAppender"/>-->
    </root>
  </log4net>
  
</configuration>